<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" >

<aside th:fragment="head_style" class="navbar navbar-default">
    <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-info " href="#"><i class="fa fa-bars"></i> </a>
                <form role="search" class="navbar-form-custom" method="post" action="search_results.html">
                    <div class="form-group"></div>
                </form>
            </div>
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle count-info" data-toggle="dropdown" href="/logout">
                    		<span class="user-info">
									 <small>欢迎      </small><small th:text="${session.user.nickName}"></small>
							</span>
                    </a>
                </li>

                <li class="dropdown">
                    <a class="dropdown-toggle count-info" id="logout_button" data-toggle="dropdown" href="/logout">
                        <i class="fa fa-sign-out"></i> 退出
                    </a>
                </li>

            </ul>
        </nav>
    </div>

    <script>
        let logoutButton = document.getElementById("logout_button");
        $('#logout_button').on('click', function(){
            layer.confirm('是否确定退出系统？', {
                    btn: ['是','否'] ,//按钮
                    icon:2,
                },
                function(){
                    parent.window.location = "/logout";
                });
        });
    </script>
</aside>
</html>